<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div{
				width: 100px;
				height: 100px;
				background: red;
			}
		</style>
	</head>
	<body>
		
		<button id="btn">按钮</button>
		<div id="box"></div>
		
		<!-- js 代码 -->
		<script>
			// 获取元素
			// 元素.事件名称 onclick(鼠标左键单击) onmouseover(鼠标移入) onmouseout(鼠标移出) 
			let oBtn = document.getElementById('btn');
			let oBox = document.getElementById('box');
			
			oBtn.onmouseover = function (){
				oBox.style.display = 'none';
			}
			
			oBtn.onmouseout = function (){
				oBox.style.display = 'block';
			}
		</script>
		
	</body>
</html>
